package com.arrogames.rgblabyrinth.game.graphics {
	import flash.display.BitmapData;
	import flash.display.Shape;
	
	import starling.display.Image;
	import starling.textures.Texture;
	
	public class Rectangle extends Image {
		public function Rectangle(color:uint, width:Number, height:Number) {
			
			var shape:Shape = new Shape();
			shape.graphics.lineStyle(1,color);
			shape.graphics.drawRect(0,0,width-1,height-1);
			
			var bitmapData:BitmapData = new BitmapData(width, height, true, 0);
			bitmapData.draw( shape, null, null, null, null, true );
			
			var texture:Texture = Texture.fromBitmapData(bitmapData, false, false, 1);
			super(texture);
			
		}
	}
}